home *** CD-ROM | disk | FTP | other *** search
/ Zoom 2 / Zoom - Release 2 (1996)(Active Software)[!].iso / programming / amos / amos_turbo / demos / static_block.amos / static_block.amosSourceCode
Encoding:
AMOS Source Code  |  1980-08-18  |  1.3 KB  |  65 lines

  1. 'Small demo to show the power of the new Static Block routines.  
  2. Screen Open 0,640,200,8,Hires
  3. Curs Off 
  4. For I=1 To 15
  5.    Circle I+1,I+1,I
  6.    Get Block I,0,0,32,32
  7. Next 
  8. 'I only do this for having more Blocks --> bigger linked list... 
  9. 'The more blocks you use in your program, the greater speedup you will have. 
  10. For I=16 To 160
  11.    Get Block I,0,0,16,16
  12. Next 
  13. 'reserve memory for 160 'static blocks'  
  14.  Extension_12_0680 160
  15. 'ok, now build the 'static list' from the 'linked list'
  16.  Extension_12_06B4 
  17. _ADDER=1
  18.  Extension_12_0016 
  19. '
  20. 'First we use the normal AMOS routines...
  21. '
  22. For I=1 To 96
  23.    Add BLOCK,_ADDER
  24.    If BLOCK=16
  25.       _ADDER=-_ADDER
  26.       BLOCK=15
  27.    Else 
  28.       If BLOCK=0
  29.          _ADDER=-_ADDER
  30.          BLOCK=1
  31.       End If 
  32.    End If 
  33.    For Y=0 To 191 Step 32
  34.       For X=0 To 608 Step 32
  35.           Put Block BLOCK,X,Y
  36.       Next 
  37.    Next 
  38. Next 
  39. _ADDER=1
  40. Repeat 
  41. Until Extension_12_03B8 
  42. '
  43. 'And now with the new Static Block command   
  44. '
  45. For I=1 To 96
  46.    Add BLOCK,_ADDER
  47.    If BLOCK=16
  48.       _ADDER=-_ADDER
  49.       BLOCK=15
  50.    Else 
  51.       If BLOCK=0
  52.          _ADDER=-_ADDER
  53.          BLOCK=1
  54.       End If 
  55.    End If 
  56.    For Y=0 To 191 Step 32
  57.       For X=0 To 608 Step 32
  58.            Extension_12_06CC BLOCK,X,Y
  59.       Next 
  60.    Next 
  61. Next 
  62.  Extension_12_0006 
  63.  Extension_12_069C 
  64. Repeat 
  65. Until Extension_12_03B8